import os
import subprocess
from pathlib import Path
import nicegui
print(Path(nicegui.__file__).parent,os.pathsep)
cmd = ['PyInstaller',
       'display_score.py',  # your main file with ui.run()
       '--name', 'ScoreBoard',  # name of your app
       '--onefile',
       '--windowed',
       '--clean',
       '--add-data', f'{Path(nicegui.__file__).parent}{os.pathsep}nicegui'
       ]
subprocess.call(cmd)
